package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.GovProListExpert;
import com.caigou.bean.cms.entity.GovProListPrize;
import com.caigou.bean.cms.param.GovProListExpertParam;
import com.caigou.bean.cms.param.GovProListPrizeParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

public interface GovProListPrizeMapper {
    GovProListPrize selectByPrimaryKey(Integer id);
    int deleteByPrimaryKey(Integer id);
    List<GovProListPrize> listPrizeByYearId(Integer prizeYearId);
    int insertSelective(GovProListPrize prize);
    int updatePrize(GovProListPrize prize);

    Integer selectMaxRank(@Param("prizeYearId") Integer prizeYearId);
    int updateRankForDelete(GovProListPrize prize);
    GovProListPrize getByRank(@Param("rank") Integer rank, @Param("prizeYearId") Integer prizeYearId);
    int updateRankForFront(GovProListPrizeParam param);
    int updateRankForBack(GovProListPrizeParam param);

    int getPrizeCountByPrizeYearId(@Param("prizeYearId") Integer prizeYearId);

}
